﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Login.aspx.cs" Inherits="FilStartUps.Account.Login" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%@ Register Src="../Controls/FilStartUps_PageNav.ascx" TagName="FilStartUps_PageNav"
    TagPrefix="uc1" %>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <link href="../Content/960.css" rel="stylesheet" type="text/css" />
    <link href="../Content/reset.css" rel="stylesheet" type="text/css" />
    <link href="../Content/text.css" rel="stylesheet" type="text/css" />
    <link href="../Content/CustomCSS.css" rel="stylesheet" type="text/css" />
    <link href="../Content/Custom.css" rel="stylesheet" type="text/css" />
    <link href="../Content/nivo-slider.css" rel="stylesheet" type="text/css" media="screen" />
    <!-- JAVASCRIPT -->
    <script src="../Script/jquery-1.7.js" type="text/javascript"></script>
    <script src="../Script/jquery-ui.min.js" type="text/javascript"></script>
    <script src="../Script/jquery.nivo.slider.js" type="text/javascript"></script>
    <script src="../Script/ui.watermark.js" type="text/javascript"></script>
    <script src="../Script/jquery.form.js" type="text/javascript"></script>
    <script src="../Script/jquery.validation.js" type="text/javascript"></script>
    <style type="text/css">
        #form1 label.error_login
        {
            color: Red;
            font-weight: bold;
            padding-bottom: 2px;
            padding-left: 10px;
        }
    </style>
    <script type="text/javascript">
        $(window).load(function () {
            $('#slider').nivoSlider({
                effect: 'random',
                slices: 14,
                animSpeed: 500,
                pauseTime: 2000,
                startSlide: 0, //Set starting Slide (0 index)
                directionNav: false,
                directionNavHide: false, //Only show on hover
                controlNav: false, //1,2,3...
                controlNavThumbs: false, //Use thumbnails for Control Nav
                pauseOnHover: true, //Stop animation while hovering
                manualAdvance: false, //Force manual transitions
                captionOpacity: 0.8, //Universal caption opacity
                beforeChange: function () { },
                afterChange: function () { },
                slideshowEnd: function () { } //Triggers after all slides have been shown
            });
        });

        //        $(function () {
        //            $(":text, :password").watermark();
        //        });

        $(document).ready(function () {
            $('#form1').validate(
           {
               errorClass: "error_login",
               rules: {
                   txtEmail: "required",
                   txtPassword: "required"
               },
               messages: {
                   txtEmail: "*",
                   txtPassword: "*"
               },
               submitHandler: function () {
                   submit_login();
               }

           })
        });


        function submit_login() {
            $('#form1').ajaxSubmit(function () {

                $('#validation_error').addClass('success').html('<img src="../Content/images/ajax-loader.gif"></img>');

                var parameters = ["emailaddress", $('#txtEmail').val(), "password", $('#txtPassword').val()];
                var paramList = '';
                if (parameters.length > 0) {
                    for (var i = 0; i < parameters.length; i += 2) {
                        if (paramList.length > 0) paramList += ',';
                        paramList += '"' + parameters[i] + '":"' + parameters[i + 1] + '"';
                    }
                }
                paramList = '{' + paramList + '}';

                $.ajax({
                    type: "POST",
                    url: "../FilStartUps_WebService.asmx/ValidateUser",
                    data: paramList,
                    contentType: "application/json; charset=utf-8",
                    dataType: "json",
                    success: function (msg) {
                        if (msg.d == true) {
                            location.href = "../Home.aspx";
                        }
                        else {
                            $('#validation_error').removeClass('success');
                            $('#validation_error').addClass('error').text('Invalid UserName or Password');
                        }
                    }
                })
            })
        }

  
    </script>
    <title>FilStartUps Login</title>
    <style type="text/css">
        .style1
        {
            width: 88px;
        }
        .style2
        {
            width: 88px;
            height: 29px;
        }
        .style3
        {
            height: 29px;
        }
        .style4
        {
            width: 88px;
            height: 33px;
        }
        .style5
        {
            height: 33px;
        }
    </style>
</head>
<body>
    <form id="form1" runat="server" autocomplete="off">
    <div id="filstartups_wrapper">
        <div id="header-wrap">
            <header>
            <hgroup>
                <h1 style="color:#fff; font-family:arial, verdana, tahoma, helvetica">FilStartUps</h1>
                   
            </hgroup>
        <!-- NAV BAR -->
        <uc1:FilStartUps_PageNav ID="FilStartUps_PageNav1" runat="server" />
        </header>
        </div>
        <!-- END NAV BAR-->
        <!-- MAIN CONTENT -->
        <div style="padding-top: 100px">
            <div id="slider">
                <a href="#">
                    <img src="../Content/images/01.jpg" alt="" title="Lorem ipsum dolor sit amet, consectetur adipiscing elit." /></a>
                <a href="#">
                    <img src="../Content/images/02.jpg" alt="" title="Nullam ante leo, consectetur eget adipiscing et." /></a>
                <a href="#">
                    <img src="../Content/images/03.jpg" alt="" title="Suspendisse sit amet enim elit. Curabitur tempor consequat." /></a>
                <a href="#">
                    <img src="../Content/images/04.jpg" alt="" title="Nulla faucibus luctus quam eget placerat." /></a>
                <a href="#">
                    <img src="../Content/images/05.jpg" alt="" title="Phasellus aliquet viverra posuere." /></a>
            </div>
            <div class="container_12" style="margin-top: 20px">
                <!-- CONTAINER BORDER --->
                <div class="grid_3">
                    <h1>
                        Welcome
                    </h1>
                    <p>
                        Welcome FilStartUps Welcome FilStartUps Welcome FilStartUps Welcome FilStartUps
                        Welcome FilStartUps Welcome FilStartUps Welcome FilStartUps Welcome FilStartUps
                        Welcome FilStartUps
                    </p>
                </div>
                <div class="grid_8" style="font-family: Verdana, Arial, Helvetica, sans-serif; padding-top: 15px">
                    <fieldset>
                        <legend>FilStartUps Login</legend>
                        <div id="validation_error" style="text-align: center">
                        </div>
                        <div class="prefix_1">
                            <asp:ScriptManager ID="ScriptManager1" EnablePageMethods="true" runat="server">
                                <Services>
                                    <asp:ServiceReference Path="~/FilStartUps_WebService.asmx" />
                                </Services>
                            </asp:ScriptManager>
                            <table style="width: 400px;">
                                <tr>
                                    <td>
                                        &nbsp
                                    </td>
                                </tr>
                                <tr>
                                    <td class="style4">
                                        <b>
                                            <asp:Label ID="lbEmail" runat="server" Text="Email:"></asp:Label></b>
                                    </td>
                                    <td class="style5">
                                        <asp:TextBox ID="txtEmail" runat="server" Width="170px" Height="20px"></asp:TextBox>
                                        <%-- <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ControlToValidate="txtEmail"
                                            Display="Dynamic" ErrorMessage="Username is Required" Font-Size="XX-Small" Font-Strikeout="False"
                                            ForeColor="Red"></asp:RequiredFieldValidator>--%>
                                    </td>
                                </tr>
                                <tr>
                                    <td class="style2">
                                        <b>
                                            <asp:Label ID="lbPassword" runat="server" Text="Password:"></asp:Label></b>
                                    </td>
                                    <td class="style3">
                                        <asp:TextBox ID="txtPassword" runat="server" Style="margin-left: 0px" Width="170px"
                                            TextMode="Password" Height="20px" MaxLength="15"></asp:TextBox>
                                        <%--<asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="txtPassword"
                                            Display="Dynamic" ErrorMessage="Password is Required" Font-Size="XX-Small" Font-Strikeout="False"
                                            ForeColor="Red"></asp:RequiredFieldValidator>--%>
                                    </td>
                                </tr>
                                <tr>
                                    <td class="style1">
                                        &nbsp;
                                    </td>
                                </tr>
                                <tr>
                                    <td colspan="2">
                                        <div style="float: right; padding-right: 150px;">
                                            <asp:Button ID="btnLogin" CssClass="btn" runat="server" Text="Login" />
                                            <asp:HyperLink ID="LkRegs" runat="server" NavigateUrl="~/Account/Registration.aspx">Register?</asp:HyperLink>
                                        </div>
                                    </td>
                                </tr>
                            </table>
                        </div>
                    </fieldset>
                </div>
                <!-- BORDER -->
            </div>
            <!-- END CONTAINER BORDER -->
        </div>
        <!-- END MAIN CONTENT -->
    </div>
    </form>
    <div class="cleaner" style="margin-top: 30px">
    </div>
    <!-- FOOTER -->
    <div id="filstartups_footer_wrapper">
        <div id="filstartups_footer">
            <div class="col_allw300_footer">
                <div class="footer_title">
                    <img src="images/newsletter.png" alt="icons" />
                    <h5>
                        SUBSCRIBE</h5>
                    GET NEWSLETTERS
                </div>
            </div>
            <div class="col_allw300_footer">
                <div class="footer_title twitter">
                    <img src="images/twitter.png" alt="icons" />
                    <h5>
                        FOLLOW US</h5>
                    ON TWITTER
                </div>
                <p>
                    <a href="#">@Duis vitae velit</a> Ut ultricies. Fusce sollicitudin nisl a lectus.
                    Pellentesque odio.</p>
                <p>
                    <a href="#">@Aenean cursus</a> Maecenas aliquam, ligula id egestas suscipit, nisi
                    sapien dignissim nibh, ac vestibulum lorem urna in neque.</p>
            </div>
            <div class="col_allw300_footer col_last">
                <div class="footer_title">
                    <img src="images/mail.png" alt="icons" />
                    <h5>
                        EMAIL</h5>
                    CONTACT US
                </div>
                <p>
                    Donec ante. Vestibulum nisl mauris, malesuada nec, dictum in, molestie in, pede.</p>
                Tel: 010-010-1234<br />
                Fax: 020-020-5678<br />
                Email: <a href="#">filstartups.com</a>
            </div>
            <div class="cleaner">
            </div>
        </div>
        <!-- end footer_wrapper -->
        <div id="copyright">
            Copyright © 2011 <a href="#">FilStartUps</a> | <a href="#" target="_parent">FilStartUps</a>
        </div>
        <!-- end copyright -->
    </div>
    <!-- end footer wrapper -->
</body>
</html>
